package com.etone.smartAudit.controller;

import com.etone.smartAudit.domain.AppManager;
import com.etone.smartAudit.service.AppManagerService;
import com.etone.smartAudit.vo.adminRole.AdminRoleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@AllArgsConstructor
@RestController
@Api(tags = "app调用管理", value = "AppManagerController")
public class AppManagerController {

    @Autowired
    private AppManagerService appManagerService;

    @ApiOperation(value = "获取指定的appid与secrt")
    @GetMapping("/appManager/{appId}")
    public AppManager detail(
            @PathVariable(value = "系统id") String appId
    ) {
        return appManagerService.getAppManagerByAppId(appId);
    }
}
